Thoughtful Machine Learning: A Test-Driven Approach by Kirk Matthew

Thoughtful Machine Learning: A Test-Driven Approach by Kirk Matthew

Author:Kirk, Matthew [Kirk, Matthew]
Language: eng
Format: azw3, epub, pdf
Tags: Itzy, Kickass.so
ISBN: 9781449374068
Publisher: O'Reilly Media
Published: 2014-09-26T04:00:00+00:00


quick

1

brown

2

fox

3

Now that we know what indices are attached to which words, we can take our string “the fox” and make a new row vector, which would look like Table 6-2.

Table 6-2. Row vector Words the quick brown fox

Indices

0

1

2

3

“the fox”

1

0

0

1

So in the case of “the fox” we only set the index 0 and 3 to 1. This seems like a good idea until you realize that most times a corpus of training data can contain thousands of words and indices. So our row vectors would be over 90% 0s and under 10% 1s for each string. Instead, we should think about using a sparse vector or hash in Ruby.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.